/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.milosnicy.miszcza.misiaela.mp3player.model;

import java.util.ArrayList;
import java.util.List;
import javax.swing.AbstractListModel;

/**
 *
 * @author Marcin.Wanke
 */
public class MP3ListModel extends AbstractListModel{

	private List<MP3Track> trackList;

	public MP3ListModel(List<MP3Track> trackList) {
		if(trackList == null){
			trackList = new ArrayList<MP3Track>();
		}
		this.trackList = trackList;
	}
	
	public int getSize() {
		return trackList.size();
	}

	public Object getElementAt(int index) {
		return trackList.get(index);
	}

}
